1. Field of the Invention
The present invention relates to an object, a method, or a manufacturing method. Further, the present invention relates to a process, a machine, manufacture, or a composition of matter. For example, in this specification, a semiconductor device, a display device, and a power storage device, driving methods of thereof, and manufacturing methods thereof are described. In this specification, as the semiconductor device, for example, a memory circuit, a processor including a memory circuit (typically, a programmable logic device, a CPU, or a microcontroller), an electronic device including the processor, and the like are described.
Note that in this specification, a semiconductor device means a device that includes a circuit including a semiconductor element (e.g., a transistor or a diode). Alternatively, the semiconductor device means any device that can function by utilizing semiconductor characteristics. For example, an integrated circuit, a chip including an integrated circuit, a display device, a light-emitting device, an electronic device, and the like are included in a semiconductor device or include a semiconductor device in some cases.
A programmable logic device (PLD) is one kind of integrated circuit, and is an integrated circuit whose internal circuit structure can be changed by a user with programming after shipment. Note that examples of user-programmable devices are small-scale integrated circuits such as a programmable array logic (PAL) and a generic array logic (GAL) and large-scale integrated circuits such as a complex programmable logic device (CPLD) and a field programmable gate array (FPGA). In this specification, programmable integrated circuits (including the above integrated circuits) are called PLDs.
Note that the term “microcontroller” means one kind of integrated circuit and is referred to as “microcontroller unit”, “microprocessor unit”, “MCU”, “μC”, and the like.
2. Description of the Related Art
One of operation testing methods of an integrated circuit is a scan test.
This is a test in which flipflops (hereinafter, also referred to as FFs) in an integrated circuit are regarded as one shift register and data stored in the FFs are sequentially obtained from an external terminal of the integrated circuit or sequentially stored to the FFs from an external terminal of the integrated circuit independently of normal circuit operation. Since the FFs are used as a register of a combination circuit, not only data stored in the FFs but also operation of a logic circuit (combination circuit) utilizing data of the FFs can be verified through a scan test.
A shift register of a scan test circuit is referred to as a scan chain in some cases. Further, a FF included in a scan chain (shift register) is referred to as a scan flipflop in some cases.
For reduced power consumption of an integrated circuit, power supply to a circuit unnecessary for operation is stopped. However, a flipflop included in a register is a volatile memory circuit generally. When data of a register is lost owing to power supply stop, continuous processing is difficult to perform in an integrated circuit even after the power supply is restarted. Therefore, saving data of a register to a nonvolatile memory before the power supply stop is proposed. For example, in Patent Document 1, saving data stored in a scan FF to a ferroelectric memory utilizing a shift register for a scan test is disclosed.